/*
 * Copyright (c) 2015. 石头哥哥
 */

package com.comom.manager.model.vo;

import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * Created by 石头哥哥 on 15/7/15.
 * PROJECT_NAME: server-java-mengchong
 * PACKAGE_NAME: com.mengchong.server.model.vo
 * COMMENT : 用于json 数据构建                下行数据
 */
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class ObjectVo {

    /**
     * 消息状态码
     */
    private int code = 0;

    /**
     * 通知消息类型
     */
    private String msg = "";


    /**
     * 数据
     */
    private ResponseVo data = null;


    /**
     * build   object and set data
     *
     * @return
     */
    public static ObjectVo newBuilder() {
        ObjectVo objectVo = new ObjectVo();
        objectVo.data = new ResponseVo();      // init data
        objectVo.code = 0;//default value is 0
        return objectVo;
    }

    /**
     * get builder data
     *
     * @return
     */
    public ResponseVo getData() {
        return data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


}
